package com.xmg.controller;

import lombok.Getter;

/**
 * @Author: mazhongqing
 * @Date: 2020/11/4 14:26
 */
@Getter
public class ResultVO<T> {


    private int code;
    private String msg;
    private T data;
    public ResultVO(T data){
        this(200,"success",data);
    }

    public ResultVO(int code,String msg,T data){
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResultVO(ResultEnum resultEnum,T data){
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
        this.data = data;
    }
}
